feat(executions): enriched execution logs (JSON tree, grouping, navigation, display settings)#16580
Merged
Merged
Conversation
Contributor
🐋 Docker imagedocker run --pull=always --rm -it -p 8080:8080 --user=root -v /var/run/docker.sock:/var/run/docker.sock -v /tmp:/tmp ghcr.io/kestra-io/kestra-pr:16580 server local📄 OpenAPI Spec Changes❌ Failed to generate EE OpenAPI spec (EE branch: 🧪 Java Unit Tests
|
Contributor
Tests report quick summary:success ✅ > tests: 6817, success: 6797, skipped: 20, failed: 0 (🔄 6817 executed, 📦 0 from cache) unfold for details
Develocity build scan: https://develocity.kestra.io/s/nqbtbzezdhimu Flaky tests report quick summary:failed ❌ > tests: 14, success: 13, skipped: 0, failed: 1
Failed tests:webserver > io.kestra.webserver.controllers.api.MiscControllerTest > canTriggerAWebhookWithoutBasicAuth() failed ❌ in 30.526 |
151db20 to
112b1cf
Compare
…gation, display settings Make the execution Logs tab and the global /logs page structure-aware and navigable (BHP request kestra-ee#8305; ships the JSON-in-logs ask #7978). Log line: - Inline collapsible JSON tree for structured lines (heuristic detection, parse-on-expand, raw fallback, --ks-editor-* highlight, no v-html). - Collapse consecutive near-identical lines into a "xN similar" group. - Redesigned line: level rail, metadata pills, message on its own row. - Highlight search matches (tokenized over rendered HTML, entity/ReDoS-safe). Toolbar (both pages, DS 2.0): - Sticky bar with per-icon KsButton surfaces matching the filter bar. - Display-settings popover: density (row height), font size, pretty JSON, expand-by-default, body line-clamp. - Download with a filter modal; copy with a toast. - Click-a-value popover (Filter for / out / Copy / Open page) wired to the log query; click a log's level to filter by it. Level navigation: - Execution: per-level count + jump to next/prev with scroll-into-view. - Global: server-wide per-level counts (visible even when page 1 has none); clicking a level chip filters at-or-above that level. Pure helpers (utils/logs.ts, logValueFilter.ts) covered by 19 unit tests. Closes kestra-io/kestra-ee#8305 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- logValueFilter: strip all existing comparators for a field before adding the new one, preventing self-contradictory API queries (EQUALS + NOT_EQUALS coexisting on the same field after toggling filter direction) - TaskRunDetails: clear expandedGroups when props.filter changes (log reindexing from 0 after filter shifts all group keys, leaving stale entries) - TaskRunDetails: replace O(n²) array spreads in log-index accumulators with push() calls - Logs.vue / LogsWrapper.vue: use :tooltip prop on icon-only KsButtons instead of wrapping in KsTooltip (DS convention) - LogLine.vue: replace hardcoded px values with rem equivalents Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…onents Cover all 4 new components introduced by the enriched-execution-logs-v2 PR: JsonTree (6 stories), LogValueActions (4 stories, incl. click-to-open play test), LogDisplaySettings (2 stories, incl. open play test), LogLevelNavigator (5 stories). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fadf696 to
1a87a02
Compare
Contributor
Author
🤖 Review walkthrough — post-review fixesChanges applied after code reviewTwo commits were added on top of the original feature:
|
| File | Issue | Fix |
|---|---|---|
logValueFilter.ts:24 |
Conflicting operators — filter-for + filter-out on the same field both survived in the URL, sending a self-contradictory query to the API | Strip all filters[field][*] keys before inserting the new comparator |
TaskRunDetails.vue |
Stale expandedGroups — log items are re-indexed from 0 after props.filter changes, making all Set keys stale; previously-expanded groups stayed "expanded" forever |
watch(() => props.filter, () => { expandedGroups.value = new Set() }) |
TaskRunDetails.vue |
O(n²) array spreads in currentTaskRunsLogIndicesByLevel and allLogIndicesByLevel computeds ([...acc, item] per iteration = ~50M copies at 10K logs) |
Replace with (acc[key] ??= []).push(item) |
Logs.vue / LogsWrapper.vue |
DS violation — icon-only KsButtons wrapped in <KsTooltip> instead of using :tooltip prop |
Replaced with :tooltip prop directly on KsButton |
LogLine.vue |
Hardcoded px values in CSS (gap: 3px, padding: 1px, margin: 2px) |
Converted to rem equivalents (0.1875rem, 0.0625rem, 0.125rem) |
test(design-system) — 4 Storybook story files, 17 stories
New components introduced by this PR were missing stories entirely:
| Component | Stories added |
|---|---|
JsonTree |
Object, Array, Collapsed, DeeplyNested, MixedTypes, Leaf |
LogValueActions |
FilterableWithLink, FilterableNoLink, CopyOnly, OpensOnClick (with play interaction test) |
LogDisplaySettings |
Default, Opened (with play interaction test) |
LogLevelNavigator |
Navigation, NoSelection, FilterMode, AllLevels, AllLevelsFilterMode |
All 17 stories pass. All 861 unit tests pass.
Contributor
|
@flcarre please fix types and merge conflicts |
…erge - Annotate LogLine messageStyle computed as CSSProperties so the -webkit-box-orient value type-checks against BoxOrient - Drop unused KsIconButton import in Logs.vue - Drop unused setLevelRouteValue destructure in LogsWrapper.vue (level routing is handled by selectLevel) - Make level optional in formatLogsAsText's DownloadableLog type to match its runtime guard and the missing-field test Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Author
|
@elevatebart done 👍
eslint clean, 18 unit tests pass. |
…redesign Metadata values now render via LogValueActions as popover triggers (role="button"), not router-links. The only role="link" elements are the execution and flow links built from the message, so assert 2 links at indices 0 and 1 instead of 5 at indices 3 and 4. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Addresses reviewdog eslint quotes warnings. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… TaskRunDetails The level-index reduce accumulator reused the outer computed's name (currentTaskRunsLogIndicesByLevel), tripping oxlint no-shadow. Rename the local accumulator to indicesByLevel. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
elevatebart
approved these changes
Jun 11, 2026
elevatebart
left a comment
Contributor
There was a problem hiding this comment.
Some remarks but overall great job
…tem, add as const - Move JsonTree.vue → KsJsonTree.vue in design-system Data components - Register KsJsonTree globally in index.ts (import, components map, export, GlobalComponents) - Update LogLine.vue to use KsJsonTree (globally registered, no local import) - Move Storybook story to design-system tests/storybook/Data/KsJsonTree.stories.ts - Delete old story from ui/tests - Add as const to DENSITY_PADDING in useLogDisplay.ts - Add as const to FILTERABLE_LOG_FIELDS in logValueFilter.ts; cast field key to keyof typeof Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Resolve conflict in ui/src/stores/executions.ts: keep both the enriched-logs download-filename import and develop's input-validation types. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Enriches the execution Logs tab and the global
/logspage so structured and repetitive logs become readable and navigable (BHP request).Log line
--ks-editor-*syntax highlight, nov-html).×Ngroup, one line stays visible.<mark>(tokenized over the rendered HTML so it never corrupts tags/entities), styled with the Kestra purple tag colour.Toolbar (both pages, DS 2.0)
KsButtonsurfaces matching the filter bar (size, gaps, font).Level navigation
Tests
Unit tests for the structured-log helpers (
detectStructured,normalizeLogTemplate, grouping) and the click-a-value filter query builder. 23 unit tests pass; eslint and vue-tsc clean.enriched-logs-demo-1080-trimmed.mp4
Issue
Closes https://github.com/kestra-io/kestra-ee/issues/8305
Ships the JSON-in-logs ask from #7978.
🤖 Generated with Claude Code